1. Field of the Invention
The present invention relates to the testing of computer programs. More specifically, the present invention relates to a method and an apparatus that uses screen capture analysis to validate the layout of a computer program's user interface during development and testing.
2. Related Art
Developing software products typically involves substantial time and effort. In addition to the actual programming effort, the development process often involves ongoing quality assurance efforts that continue for the lifetime of a software product. For instance, validating the operation of a browser-based software application may involve testing a range of program features across a range of operating systems and browsers. Such testing typically needs to be repeated every time the program code or execution environment changes to ensure that the changes do not cause errors. Moreover, testing efforts typically include tests that check whether any changes negatively impact the user interface that the program presents to an end user.
Efforts to streamline the testing process often involve automating aspects of the testing process. For instance, some testing tools can automatically initiate a stream of user-interface operations that bring a program to a desired program state and then programmatically capture a screenshot of the program's user interface. A quality assurance tester can then visually inspect this screenshot to determine whether the current user-interface output matches the intended output. Unfortunately, while such automation capabilities reduce the amount of human effort needed, validating a complex user interface with a wide array of states and conditions still requires a tester to inspect a large number of screenshots and confirm that the user interface continues to function as intended.
Hence, what is needed are techniques for automating aspects of program testing without the above-described problems of existing techniques.